<template>
	<div class="store">
		<header class="header">
		    <p>基本业务操作</p>
		</header>
		<body class="body">
			<div class="box" v-for="(item,index) in list" @click="goNext(item)">
				<i :class="item.icon" :style="{color:item.color}"></i>
				<p>{{item.title}}</p>
			</div>
		</body>
	</div>
</template>

<script>
import {data} from '@/common/js/salesman'
	export default {
		name:'store',
		components:{
			
		},
		data () {
			return {
				list:data.storeList,
				sort:0,
				shopname:''
			}
		},
		created (){
			 window.document.title = this.$route.meta.title;
			 if(!!this.$route.query.shopId) {
			 	this.$store.state.shop_id = this.$route.query.shopId
			 	this.$store.state.shop_name = this.$route.query.shopName
			 }
			  this.status = this.$store.state.status
			  this.shopname = this.$store.state.shop_name;
		},
		mounted () {  
			this.login()
		},
		methods:{
			login () {
				this.$http.get(this.$store.state.reqUrl + '/test/login',{
					openId:123
				}).then(res => {
					console.log(res)
			    })
				},
			goNext (item) {
				this.$router.push({
					path:item.path,
					query:{
						shop_url:item.shopurl,
						order_name:item.title,
						status:item.status,
					}
				});
			},
			back () {
				this.$router.push("/shop")
			}
		}
	}
</script>

<style lang="less" scoped>
     .store{
     	.header{
     		width:100%;
     		height: 100px;
     		line-height: 100px;
     		color: #FFFFFF;
     		background: #00a6ac;
     		font-size: 32px;
     		text-align: center;
     	}
     	.body{
     	   background: #FFFFFF;
     	   display: flex;
           padding: 80px 0 100px 40px;
     	   flex-wrap: wrap;    	
     	   .box{
     	   	  width:220px;
     	   	  height: 200px;
     	   	  text-align:center;
     	   	  line-height: 40px;
     	   	  i{
     	   	  	font-size: 90px;
     	   	  }
     	   	  p{
     	   	  	font-size: 24px;
     	   	  }
     	   }
     	}
     }
</style>